package com.example.stock.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//@RestController
//@RefreshScope
//@RequestMapping("/stock")
//public class StockController {
//    @Value("${user.name}")
//    private String name;
//    @Value("${user.age}")
//    private Integer age;
//
//    @RequestMapping("/info")
//    public String info(){
//        return "姓名："+name+"，年龄："+age;
//    }
//}
@RestController
@RequestMapping("/stock")
public class StockController {
    @RequestMapping("/reduce")
    public String reduce() {
        System.out.println("扣减库存");
        return "扣减库存";
    }

//    第三次作业
    @RequestMapping("/work")
    public String work() {
        System.out.println("第三次作业");
        return "第三次作业";
    }

    @RequestMapping("/readStock")
    public String readStock() {
        System.out.println("网关测试：stock服务");
        return "网关测试：stock服务";
    }
}